const mongoose = require("mongoose");

// let schema = mongoose.Schema()

// const article = mongoose.model("article", schema, "article");

// module.exports = article

const schema = new mongoose.Schema({
    //文件Id
    idNo: { type: Number },
    // 标题
    title: { type: String },
    // 标签
    tags: { type: Array },
    // 发布时间
    publishTime: { type: String },
    // 发布月份
    publishMonth: { type: String },
    // 发布日期
    publishDay: { type: String },
    // 主要内容
    mainText: { type: String },
    // 简要内容
    minorText: { type: String },
    // 简要内容2
    minorSecdText: { type: String },
    // 评论数
    comments: { type: String },
    // 阅读时间
    readingTime: { type: Number },
});

module.exports = mongoose.model("article", schema, "article");
